package cn.q3c.web.tool;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.q3c.web.tool.dao.MatchDAO;
import cn.q3c.web.tool.object.Match;

/**
 * 远程接收抓取的页面信息
 * 
 * @author Yoyo
 * 
 */
@Controller
public class ShowMatchWebService {

	@Autowired
	@Qualifier("matchDAO")
	private MatchDAO matchDAO = null;
	
	@RequestMapping("/match.do")
	@ResponseBody
	public List<Match> match(
			@RequestParam("matchtype") String matchtype
	) throws SQLException
	{
		List<Match> retList = matchDAO.getMatchList(matchtype);
		return retList;
	}
}
